Skip to content

Fix mismatched lifetime warning#244

Merged
igr001-galactica merged 1 commit intoFoxIO-LLC:mainfrom
vlvkobal:fix-lint-error
Aug 5, 2025
Merged

Fix mismatched lifetime warning#244
igr001-galactica merged 1 commit intoFoxIO-LLC:mainfrom
vlvkobal:fix-lint-error

Conversation

@vlvkobal
Copy link
Member

@vlvkobal vlvkobal commented Aug 4, 2025

Fix the following Rust 2021 mismatched-lifetime warning in iter() by
using an explicit '_ lifetime in the return type:

error: hiding a lifetime that's elided elsewhere is confusing
  --> ja4/src/pcap.rs:66:24
   |
66 |     pub(crate) fn iter(&self) -> impl Iterator<Item = Proto> {
   |                        ^^^^^                          ----- the same lifetime is hidden here
   |                        |
   |                        the lifetime is elided here
   |
   = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
   = note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]`
help: use `'_` for type paths
   |
66 |     pub(crate) fn iter(&self) -> impl Iterator<Item = Proto<'_>> {
   |                                                            ++++

@vlvkobal vlvkobal requested a review from vvv August 4, 2025 18:11
@igr001-galactica igr001-galactica merged commit f0b35aa into FoxIO-LLC:main Aug 5, 2025
9 checks passed
@vlvkobal vlvkobal deleted the fix-lint-error branch August 5, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants